package com.zzc.mapper;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.AdminUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhouzhou
 */
public interface AdminUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AdminUser record);

    int insertSelective(AdminUser record);

    AdminUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AdminUser record);

    int updateByPrimaryKey(AdminUser record);

    AdminUser doLogin(@Param("email") String email, @Param("password") String password);

    /**
     * 动态查询
     * @param realName
     * @param email
     * @param status
     * @return
     */
    List<AdminUser> getUserList(@Param("name") String realName,@Param("email") String email,@Param("status") Integer status);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteUserById(Integer[] ids);

    /**
     * 查询用户权限id
     * @param userId
     * @return
     */
    List<Integer> getUserRole(Integer userId);
}